package fileexplorer;

import fileexplorer.util.OSUtil;

/**
 * Created with IntelliJ IDEA.
 * User: rejeev
 * Date: 4/27/13
 * Time: 1:59 PM
 * To change this template use Leaf | Settings | Leaf Templates.
 */
public class Configuration {
    public static String defaultLocation = "/home/rejeev";
    public static int level = 3;



    public static String getDefaultLocation(){
        if(OSUtil.getOSType().equals(OSUtil.OS.Windows)) return "c:\\";
        if(OSUtil.getOSType().equals(OSUtil.OS.Linux)) return "/home/rejeev";
        return null;
    }

    public static String getDefaultProgram(String ext){
        switch (ext){
            case "txt":
            case "java":
            case "xml":
                return getDefaultTextEditor();
            case "pdf":
                return "evince";
            default:
                return getDefaultTextEditor();
        }
    }

    private static String getDefaultTextEditor(){
        if(OSUtil.osType.equals(OSUtil.OS.Windows)) return "C:\\Apps\\NotepadPP\\notepad++.exe";
        if(OSUtil.osType.equals(OSUtil.OS.Linux)) return "gedit";
        return null;
    }
}
